home *** CD-ROM | disk | FTP | other *** search
- Path: noc.tor.hookup.net!news
- From: Rajendra_Singh@msn.com (Rajendra Singh)
- Newsgroups: comp.lang.c,comp.lang.c++
- Subject: Re: How to the size of a file in C ?
- Date: Sat, 10 Feb 1996 02:12:59 GMT
- Organization: HookUp Communication Corporation, Oakville, Ontario, CANADA
- Message-ID: <4fgjs3$lt2@noc.tor.hookup.net>
- References: <4ffeqa$pjh@brtph500.bnr.ca>
- NNTP-Posting-Host: u36u400.tor.hookup.net
- NNTP-Posting-User: u36u400
- X-Newsreader: Forte Free Agent 1.0.82
-
- Gilbert Banks <gilbertb@bnr.ca> wrote:
-
- >How do I get the size of a file in C UNIX-based? I tried sizeof <file>, but
- >that only returns the size of the object called "<file>" and not the data.
- >I know about filelength(), also, but that is DOS, Windows, and OS/2.
-
- Open the file and use lseek() with the SEEK_END constant as the
- origin. lseek() will return the number of bytes.
- ---
- Rajendra Singh, B. Sc. (Rajendra_Singh@msn.com)
- "What is understood need not be discussed." - Loren Adams
-
-